// src/mock/index.js
import Mock from "mockjs";

// 模拟指标域类型数据
Mock.mock("/api/metric-domains", "get", () => {
  return Mock.mock({
    code: 200,
    data: [
      {
        "id|+1": 1,
        name: "类型@integer(一,五)指标域",
        "indicatorGroups|2-3": [
          {
            "id|+1": 10,
            title: "指标分组@integer(一,五)",
            checked: false,
            indeterminate: false,
            "children|2-4": [
              {
                "id|+1": 100,
                title: "指标@ctitle(3,5)",
                checked: false,
              },
            ],
          },
        ],
        "themeDomains|1-2": [
          {
            "id|+1": 1000,
            name: "主题域@ctitle(3,5)",
            checked: false,
            indeterminate: false,
            "tables|2-3": [
              {
                "id|+1": 10000,
                name: "主题表@ctitle(3,5)",
                checked: false,
              },
            ],
          },
        ],
      },
    ],
  });
});

// 模拟指标表格数据
Mock.mock("/api/metrics", "get", () => {
  return Mock.mock({
    code: 200,
    data: {
      "list|10-20": [
        {
          "index|+1": 1,
          name: "@ctitle(4,6)指标",
          domain: "主题域@integer(一,五)",
          creator: "@cname",
          createTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
        },
      ],
    },
  });
});
